<!--header-->
<!--# include virtual="/ceca_two/common/html/header.html"-->
<link rel="stylesheet" href="/ceca_two/css/costShareOne.css" />
<link rel="stylesheet" href="/ceca_two/css/shareSubmit.css" />
<script type="text/javascript">
	var annexFile = new Array();
	var annexPhoto = new Array();
	var annexSpace = new Array();
	var annexSystem = new Array();
	var annexStereogram = new Array();
	var annexSix = new Array();
</script>
<div class="content">
	<ul class="shareList">
		<li>当前位置：</li>
		<li><a href="##">首页</a></li>
		<li>&gt;</li>
		<li><a href="##">我要分享</a></li>
	</ul>
	<div class="shareSuccess">
		<div class="selfMotion">
			自动保存成功
		</div>
		<h1 class="costShare">造价指标分享</h1>
	</div>
	<div class="shareText">
		<ul class="shareMessage">
			<li>分享人：<span>在线</span></li>
			<li>分享人单位：<span>中国工程造价协会</span></li>
		</ul>
		<h1 class="shareName">附件  <span style="font-size: 12px;color: #ff4000;margin-left: 30px;">注意：以下文件除指标文件外其他项目仅用于验证上传指标的真实性，不用于展示。请务必上传，以便成功通过审核！</span></h1>
	</div>
	<!--# include virtual="/ceca_two/modules/share/civicism/base/first.html"-->
	<!--# include virtual="/ceca_two/modules/share/civicism/base/second.html"-->
	<!--# include virtual="/ceca_two/modules/share/civicism/base/third.html"-->
	<!--# include virtual="/ceca_two/modules/share/civicism/base/fourth.html"-->
	<!--# include virtual="/ceca_two/modules/share/civicism/base/fifth.html"-->	
	<!--# include virtual="/ceca_two/modules/share/civicism/base/sixth.html"-->	
	<div class="shareCostBtn">
		<div class="saveBtn" style="margin: 50px 20px 50px 420px;">
			<a href="">保存</a>
		</div>
		<div class="nextBtn" id="prevBtn">
			<button>上一步</button>
		</div>
		<div class="nextBtn" id="upBtn">
			<button>提交</button>
		</div>
	</div>
</div>
<script>

</script>
<!--底部-->
<!--# include virtual="/ceca_two/common/html/footer.html"-->
<script type="text/javascript">
layui.use(['costshareOne','sharesubmit','layer'], function() {
		
	var costId = GetQueryString("costId");
	var catalogId = GetQueryString("catalogId");
	
	function GetQueryString(name){
	     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	     var r = window.location.search.substr(1).match(reg);
	     if(r!=null)return  unescape(r[2]); return null;
	}
	var layer = layui.layer;
	$("#upBtn").click(function(){
		$.ajax({
			type:"post",
			url:"/guidance_service/front/costIndex/update.do",
			data:{
				costId : costId,
				annex: JSON.stringify(
					{"annexFile":annexFile,
					 "annexPhoto":annexPhoto,
					 "annexSpace":annexSpace,
					 "annexSystem":annexSystem,
					 "annexStereogram":annexStereogram,
					 "annexSix" : annexSix
					})
			},
			success:function (result){
				console.log(result);
				layer.open({
					type:1,
					content:'<img src="/ceca_two/img/tch_icon.png"/><h1>提交成功 </h1><p>感谢您的分享，若您的指标被收录，您将会收到一份有关指标分析的报告。</p>',
					area:['405px','235px'],
					offset:'200px',
					btn:'关闭',
					btn1: function(index, layero){
						window.location.href="/ceca_two/modules/share/index.html";
					}
				});	
			},error:function (){
				layer.msg("请求错误！请稍候重试",{icon:2,time:3000});
			}
		});
	});
	
	$("#prevBtn").on("click",function (){
		window.history.go(-1)
	})
	
});
</script>
</body>
</html>